$this->skin =& $skin;
$this->preCacheMessages();
}
-
+
function newFromUser( &$user ) {
$sk =& $user->getSkin();
if( $user->getOption('usenewrc') ) {
$s .= $this->skin->commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
}
}
-
+
/**
* Check whether to enable RC-Patrol features
* @return bool
return $wgUseRCPatrol && $wgUser->isLoggedIn() &&
( !$wgOnlySysopsCanPatrol || $wgUser->isAllowed( 'patrol' ) );
}
-
+
/**
* Make user link (or user contributions for unregistered users)
* @param int $userId
return $this->skin->makeLinkObj( $userPage, $encName );
}
}
-
+
/**
* @param int $userId
* @param string $userText
global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans;
$talkable = !( $wgDisableAnonTalk && 0 == $userId );
$blockable = ( $wgSysopUserBans || 0 == $userId );
-
+
$items = array();
if( $talkable ) {
$items[] = $this->userTalkLink( $userId, $userText );
if( $blockable && $wgUser->isAllowed( 'block' ) ) {
$items[] = $this->blockLink( $userId, $userText );
}
-
+
if( $items ) {
return ' (' . implode( ' | ', $items ) . ')';
} else {
return '';
}
}
-
+
/**
* @param int $userId
* @param string $userText
function userTalkLink( $userId, $userText ) {
global $wgContLang;
$talkname = $wgContLang->getNsText( NS_TALK ); # use the shorter name
-
+
$userTalkPage = Title::makeTitle( NS_USER_TALK, $userText );
$userTalkLink = $this->skin->makeLinkObj( $userTalkPage, $talkname );
return $userTalkLink;
}
-
+
/**
* @param int $userId
* @param string $userText
}
$rc->userlink = $this->userLink( $rc_user, $rc_user_text );
-
+
$rc->lastlink = $lastLink;
$rc->curlink = $curLink;
$rc->difflink = $diffLink;
}
return $ret;
}
-
+
/**
* Enhanced RC group
*/
$this->rcCacheIndex++;
return $r;
}
-
+
function maybeWatchedLink( $link, $watched=false ) {
if( $watched ) {
// FIXME: css style might be more appropriate
return $link;
}
}
-
+
/**
* Generate HTML for an arrow or placeholder graphic
* @param string $dir one of '', 'd', 'l', 'r'
$encAlt = htmlspecialchars( $alt );
return "<img src=\"$encUrl\" width=\"12\" height=\"12\" alt=\"$encAlt\" />";
}
-
+
/**
* Generate HTML for a right- or left-facing arrow,
* depending on language direction.
$dir = $wgContLang->isRTL() ? 'l' : 'r';
return $this->arrow( $dir, '+' );
}
-
+
/**
* Generate HTML for a down-facing arrow
* depending on language direction.
function downArrow() {
return $this->arrow( 'd', '-' );
}
-
+
/**
* Generate HTML for a spacer image
* @return string HTML <img> tag